#include <iostream>
#include <string>


int main()
{
  unsigned char ch[] = {65, 66, 67};
  unsigned char* c = ch;
  unsigned char* d = new unsigned char();
  unsigned char* e = d;

  int i = 0;

  while (*c != '\0')
    {
      *d = *c;
      ++d;

      std::cerr << *c << std::endl;
      ++c;

      std::cerr << ch[i] << std::endl;
      ++i;
    }
  *d = '\0';

  while (*e != '\0')
    {
      std::cerr << *e << std::endl;
      ++e;
    }

  --e;
  std::cerr << "Last character: " << *e << std::endl;  

  std::cerr << "ok" << std::endl;
}
